package com.softline.documentsmall.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.softline.documentsmall.entity.RelateBook;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface RelateBookMapper extends BaseMapper<RelateBook> {
    int deleteByPrimaryKey(Integer id);

    int insertSelective(RelateBook record);

    RelateBook selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(RelateBook record);

    int updateByPrimaryKey(RelateBook record);

    /**
     * 根据名字查询列表
     *
     * @param name
     * @return
     */
    List<Map<String, Object>> selectListByName(@Param("name") String name);

    /**
     * 列表查询
     *
     * @param dicId
     * @param pageNo
     * @param pageSize
     * @return
     */
    List<RelateBook> selectListLocal( @Param("title") String title, @Param("dicId") Integer dicId, @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize);

    int insertLocal(RelateBook record);

    long selectLocalCount(@Param("title") String title,@Param("dicId") Integer dicId);
}
